using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using device;

namespace MainView.View
{
	public class ModelEnableConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			if (value != null && value != DependencyProperty.UnsetValue && value is string && (value.ToString() == Device.DeviceModel_48P || value.ToString() == Device.DeviceModel_24P || value.ToString() == Device.DeviceModel_96S))
			{
				return false;
			}
			return true;
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			return value;
		}
	}
}
